<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
	xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
<head>
<meta charset="UTF-8">
<title>登录</title>

<link th:href="@{/easyui/themes/icon.css}" rel="stylesheet"
	type="text/css">
<link th:href="@{/easyui/themes/default/easyui.css}" rel="stylesheet"
	type="text/css">

<script th:src="@{/easyui/jquery.min.js}"></script>
<script th:src="@{/easyui/jquery.easyui.min.js}"></script>


<script type="text/javascript">
	function login() {
		$.ajax({
			url : "/login",
			type : "post",
			dataType : "json",
			data : {
				username : admin,
				password : 123456
			},
			success : function(data) {
				if (data.code = 200) {
					window.location.href = "/index";
				}
			}
		});
	}
</script>

</head>
<body>

	

	<form action="/login" method="post">
		<h1>登录页面</h1>
		用户名：<input type="text" name="username" value="admin"><br />
		密码：<input type="password" name="password" value="123456"><br />
		<label for="remember-me">自动登录</label><input id="remember-me"
			type="checkbox" name="remember-me"><br />
		<div th:if="${param.error}">
			<p style="color: red;">用户名或密码无效</p>
		</div>
		<input type="submit" value="登录">
		<p></p>
	</form>
</body>
</html>